//
//  MainPartData.m
//  Audit
//
//  Created by fenggu07 on 15/3/4.
//  Copyright (c) 2015年 cc. All rights reserved.
//

#import "MainPartData.h"

@implementation MainPartData

- (id)initWithInfo:(NSDictionary *)info {
    
    if (!info && [info isKindOfClass:[NSDictionary class]]) {
        return nil;
    }
    
    self = [super init];

    if (self) {
        self.mainPartKey    = [info objectForKey:@"key"];
        self.mainPartCode   = [[info objectForKey:@"value"] substringToIndex:[[info objectForKey:@"value"] rangeOfString:@" "].location];
        self.mainPartDesc   = [[info objectForKey:@"value"] substringFromIndex:[[info objectForKey:@"value"] rangeOfString:@" "].location + 1];
    }
    
    return self;
}


@end
